#include "widget.h"

Widget::Widget(QWidget *parent) : QWidget(parent)
{
    dock = new Dock(this);
    musicTable = new MusicTable(this);
    controlBar = new ControlBar(this);

    QHBoxLayout* l = new QHBoxLayout;
    l->setContentsMargins(0, 0, 0, 0);
    l->setSizeConstraint(QLayout::SetMaximumSize);
    l->addWidget(dock);

    QVBoxLayout* rightPaneLayout = new QVBoxLayout;
    rightPaneLayout->addWidget(musicTable);
    rightPaneLayout->addWidget(controlBar, 0, Qt::AlignBottom);

    l->addLayout(rightPaneLayout);
    setLayout(l);


    QObject::connect(dock, SIGNAL(filterNeedsUpdate(QString)), musicTable, SLOT(filter(QString)));


}
